package n09.first;
import java.util.Arrays;

import n09.first.Teacher.SortBy;

public class TeacherTest {
	public static void main(String[] args) {
		Teacher[]a= { 
			new Teacher("张三", 25, 175),
			new Teacher("李四", 22, 175),
			new Teacher("王五", 20, 170),
			new Teacher("杨柳", 22, 180),
		};
		System.out.println("按年龄升序、身高的降序排列：");
		Arrays.sort(a, Teacher.sortBy(SortBy.Age, SortBy.HeightDec));
		for(Teacher s: a) {
			System.out.println("    "+s);
		}
	}
}
